package edu.vital.energy.longevity.ch10.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

/**
 * @Classname Comment
 * @Description 数据库表t_comment对应的实体类Comment;为了实现对象的缓存存储，还需要实现序列化接口
 * @Date 2019-3-4 9:28
 * @Created by CrazyStone
 */
@TableName("t_comment")  // MyBatis-Plus 表名注解
public class Comment   {


    @TableId(value = "id", type = IdType.AUTO) // MyBatis-Plus 主键注解
    private Integer id;
    private String content;
    private String author;
    // 指定映射的表字段名
    private Integer aId;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Integer getAId() {
        return aId;
    }

    public void setAId(Integer aId) {
        this.aId = aId;
    }


    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", author='" + author + '\'' +
                ", aId=" + aId +
                '}';
    }
}

